import { createRouter, createWebHashHistory } from 'vue-router';

/**
 * 定义默认路由
 */
let defaultRoutes = [
  {
    path: '/',
    name: '根路由重定向',
    redirect: '/host'
  },
  {
    path: '/host',
    name: '主机管理',
    menu: true,
    component: () => import('@/views/host'),
  },
  {
    path: '/firewall',
    name: '防火墙',
    menu: true,
    component: () => import('@/views/firewall'),
  },
  {
    path: '/route',
    name: '路由管理',
    menu: true,
    component: () => import('@/views/route'),
  },
  {
    path: '/file-auth',
    name: '文件权限',
    menu: true,
    component: () => import('@/views/route'),
  },
];

let router = createRouter({
  history: createWebHashHistory(),
  routes: defaultRoutes,
});



export default router;
export {
  defaultRoutes
};
